include("shared.lua")
 local Laser = Material( "cable/redlaser" ) 
function ENT:Draw()
  

	self.Entity:DrawModel()
	render.SetMaterial(Material("sprites/glow04.vmt"))
	
	
	
	local c = nil
	local tr = LocalPlayer():GetEyeTrace()
	
	if LocalPlayer().SpawnBeacon == self then
		c = Color(0,255,0,255)
	else
		c = Color(255,0,0,255)
		if tr.Entity == self then
			AddWorldTip( self.Entity:EntIndex(), "Spawn Beacon.\n Use me to respawn\nat this beacon", 0.5, self.Entity:GetPos(), self.Entity ) 
		end
	end
	

	if(self:Blocked()) then
		local i = CurTime() % 0.5
		c = Color(0,255,0,255)
		if i < 0.25 then c = Color(255,0,0,255) end
	end
	
	local s =10
	render.DrawSprite(self:LocalToWorld(Vector(12,0,0)),s,s,c)
	render.DrawSprite(self:LocalToWorld(Vector(-12,0,0)),s,s,c)
	render.DrawSprite(self:LocalToWorld(Vector(0,12,0)),s,s,c)
	render.DrawSprite(self:LocalToWorld(Vector(0,-12,0)),s,s,c)
	
   
end 

